using System;
using System.Globalization;
using System.Windows.Data;

namespace MinoChat.Converters;

public class AvatarConverter : IValueConverter
{
    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    {
        if (value is bool isUserMessage)
        {
            return isUserMessage
                ? "/MinoChat;component/Resources/Images/user.png"
                : "/MinoChat;component/Resources/Images/assistant.png";
        }

        return "/MinoChat;component/Resources/Images/assistant.png";
    }

    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
    {
        throw new NotImplementedException();
    }
}
